home *** CD-ROM | disk | FTP | other *** search
- /* ==============
- * PedAgentDoc.hh
- * ==============
- */
-
- #include "PedAgentDoc.hh"
- #include "PedDocument.hh"
- #include "PedWindow.hh"
-
- PedAgentDoc::PedAgentDoc(PedTask *inParent)
- : PedAgent(inParent)
- {
- }
-
- PedAgentDoc::~PedAgentDoc()
- {
- }
-
- void
- PedAgentDoc::InitWindow()
- {
- if (!mWindow) {
- // Note that at the moment, PedWindow() calls SetWindow(),
- // which sets mWindow, so this is redundant (but harmless).
- mWindow = new PedWindow(this);
- // Counterbalance the implicit retain. (SetWindow will retain for us.)
- mWindow->release();
- }
- }
-
- bool
- PedAgentDoc::OpenWindow()
- {
- return PedAgent::OpenWindow();
- }
-
- bool
- PedAgentDoc::CloseWindow()
- {
- if (Document()->CloseWindow()) {
- return PedAgent::CloseWindow();
- } else {
- return false;
- }
- }
-